<!DOCTYPE html>
<html lang="en" class="h100">
<head>
    <title>{$web_title}</title>
    {include file='public/public_head' /}
</head>
<body>
    <div class="main-wrap detail-wrap over">
        <div class="content-item-wrap pic-wrap detail-pic-wrap">
            <img src="{$activity_info.banner}" alt="" class="pic-img detail-img" />
        </div>
        <div class="container">
            <div class="content-item-wrap sign-form-wrap mb-3 {if $activity_info.id == 3}mt-0{/if}">
                <form method="post" id="form_data">
                    <input type="hidden" name="aid" value="{$activity_info.id}" />
                    <input type="hidden" name="uid" value="{$activity_info.id}" />
                    <ul class="list-wrap form-body-wrap form-info-wrap">
                        <li class="list-item form-info-item flex rcb">
                            <div class="form-title-view">
                                <span class="form-title">姓名</span>
                            </div>
                            <div class="form-con-view">
                                <input name="username" type="text" class="form-con-value form-input-item" placeholder="请输入姓名" value="{$sign_info.username | default=''}" />
                            </div>
                        </li>
                        <li class="list-item form-info-item flex rcb">
                            <div class="form-title-view">
                                <span class="form-title">身份证号</span>
                            </div>
                            <div class="form-con-view">
                                <input name="id_card_no" type="text" class="form-con-value form-input-item" placeholder="请输入身份证号" value="{$sign_info.id_card_no | default=''}" />
                            </div>
                        </li>
                        <li class="list-item form-info-item flex rcb">
                            <div class="form-title-view">
                                <span class="form-title">手机号</span>
                            </div>
                            <div class="form-con-view">
                                <input name="mobile" type="text" class="form-con-value form-input-item" placeholder="请输入手机号" value="{$sign_info.mobile | default=''}" />
                            </div>
                        </li>
                        <li class="list-item form-info-item flex rcb">
                            <div class="form-title-view">
                                <span class="form-title">邮箱</span>
                            </div>
                            <div class="form-con-view">
                                <input name="email" type="text" class="form-con-value form-input-item" placeholder="请输入邮箱" value="{$sign_info.email | default=''}" />
                            </div>
                        </li>
                        {if $activity_info.id != 2}
                        <li class="list-item form-info-item flex rcb">
                            <div class="form-title-view">
                                <span class="form-title">毕业院校</span>
                            </div>
                            <div class="form-con-view">
                                <input name="graduated_school" type="text" class="form-con-value form-input-item" placeholder="请输入毕业院校" value="{$sign_info.graduated_school | default=''}" />
                            </div>
                        </li>
                        <li class="list-item form-info-item flex rcb">
                            <div class="form-title-view">
                                <span class="form-title">学历</span>
                            </div>
                            <div class="form-con-view">
                                <div class="form-select-value-item flex rce">
                                    <span class="value-item">{$sign_info.education | default='本科'}</span>
                                    <img src="__INDEX__/icon/icon_arrow_right.png" alt="" class="arrow-icon" />
                                </div>
                                <select name="education" onchange="selectOnChange(this);" class="form-con-value form-select-item">
                                    <option {if !empty($sign_info) && $sign_info.education == '初中'}selected{/if} value="初中">初中</option>
                                    <option {if !empty($sign_info) && $sign_info.education == '中技'}selected{/if} value="中技">中技</option>
                                    <option {if !empty($sign_info) && $sign_info.education == '高中'}selected{/if} value="高中">高中</option>
                                    <option {if !empty($sign_info) && $sign_info.education == '中专'}selected{/if} value="中专">中专</option>
                                    <option {if !empty($sign_info) && $sign_info.education == '大专'}selected{/if} value="大专">大专</option>
                                    <option {if (!empty($sign_info) && $sign_info.education == '本科') || $sign_info == ''}selected{/if} value="本科">本科</option>
                                    <option {if !empty($sign_info) && $sign_info.education == '硕士'}selected{/if} value="硕士">硕士</option>
                                    <option {if !empty($sign_info) && $sign_info.education == 'MBA'}selected{/if} value="MBA">MBA</option>
                                    <option {if !empty($sign_info) && $sign_info.education == 'EMBA'}selected{/if} value="EMBA">EMBA</option>
                                    <option {if !empty($sign_info) && $sign_info.education == '博士'}selected{/if} value="博士">博士</option>
                                </select>
                            </div>
                        </li>
                        <li class="list-item form-info-item flex rcb">
                            <div class="form-title-view">
                                <span class="form-title">毕业年度</span>
                            </div>
                            <div class="form-con-view">
                                <div class="form-select-value-item flex rce">
                                    <span class="value-item">{$sign_info.graduation_year | default='2023'}</span>
                                    <img src="__INDEX__/icon/icon_arrow_right.png" alt="" class="arrow-icon" />
                                </div>
                                <select name="graduation_year" onchange="selectOnChange(this);" class="form-con-value form-select-item">
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2000'}selected{/if} value="2000">2000</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2001'}selected{/if} value="2001">2001</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2002'}selected{/if} value="2002">2002</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2003'}selected{/if} value="2003">2003</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2004'}selected{/if} value="2004">2004</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2005'}selected{/if} value="2005">2005</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2006'}selected{/if} value="2006">2006</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2007'}selected{/if} value="2007">2007</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2008'}selected{/if} value="2008">2008</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2009'}selected{/if} value="2009">2009</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2010'}selected{/if} value="2010">2010</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2011'}selected{/if} value="2011">2011</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2012'}selected{/if} value="2012">2012</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2013'}selected{/if} value="2013">2013</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2014'}selected{/if} value="2014">2014</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2015'}selected{/if} value="2015">2015</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2016'}selected{/if} value="2016">2016</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2017'}selected{/if} value="2017">2017</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2018'}selected{/if} value="2018">2018</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2019'}selected{/if} value="2019">2019</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2020'}selected{/if} value="2020">2020</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2021'}selected{/if} value="2021">2021</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2022'}selected{/if} value="2022">2022</option>
                                    <option {if (!empty($sign_info) && $sign_info.graduation_year == '2023') || $sign_info == ''}selected{/if} value="2023">2023</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2024'}selected{/if} value="2024">2024</option>
                                    <option {if !empty($sign_info) && $sign_info.graduation_year == '2025'}selected{/if} value="2025">2025</option>
                                </select>
                            </div>
                        </li>
                        <li class="list-item form-info-item flex rcb">
                            <div class="form-title-view">
                                <span class="form-title">意向行业</span>
                            </div>
                            <div class="form-con-view">
                                <div class="form-select-value-item flex rce">
                                    <span class="value-item">{$sign_info.industry_type | default='请选择'}</span>
                                    <img src="__INDEX__/icon/icon_arrow_right.png" alt="" class="arrow-icon" />
                                </div>
                                <select name="industry_type" onchange="selectOnChange(this);" class="form-con-value form-select-item">
                                    <option value="">请选择</option>
                                    <option {if !empty($sign_info) && $sign_info.industry_type == '互联网'}selected{/if} value="互联网">互联网</option>
                                    <option {if !empty($sign_info) && $sign_info.industry_type == '房地产'}selected{/if} value="房地产">房地产</option>
                                    <option {if !empty($sign_info) && $sign_info.industry_type == '新能源'}selected{/if} value="新能源">新能源</option>
                                    <option {if !empty($sign_info) && $sign_info.industry_type == '金融业'}selected{/if} value="金融业">金融业</option>
                                    <option {if !empty($sign_info) && $sign_info.industry_type == '文化业'}selected{/if} value="文化业">文化业</option>
                                    <option {if !empty($sign_info) && $sign_info.industry_type == '物流业'}selected{/if} value="物流业">物流业</option>
                                    <option {if !empty($sign_info) && $sign_info.industry_type == '制造业'}selected{/if} value="制造业">制造业</option>
                                    <option {if !empty($sign_info) && $sign_info.industry_type == '其它'}selected{/if} value="其它">其它</option>
                                </select>
                            </div>
                        </li>
                        <li class="list-item form-info-item flex rcb">
                            <div class="form-title-view">
                                <span class="form-title">求职岗位</span>
                            </div>
                            <div class="form-con-view">
                                <div class="form-select-value-item flex rce">
                                    <span class="value-item">{$sign_info.job_type | default='请选择'}</span>
                                    <img src="__INDEX__/icon/icon_arrow_right.png" alt="" class="arrow-icon" />
                                </div>
                                <select name="job_type" onchange="selectOnChange(this);" class="form-con-value form-select-item">
                                    <option value="">请选择</option>
                                    <option {if !empty($sign_info) && $sign_info.job_type == '销售（助理/客户经理）'}selected{/if} value="销售（助理/客户经理）">销售（助理/客户经理）</option>
                                    <option {if !empty($sign_info) && $sign_info.job_type == '技术（前端/后端/测试）'}selected{/if} value="技术（前端/后端/测试）">技术（前端/后端/测试）</option>
                                    <option {if !empty($sign_info) && $sign_info.job_type == '设计（视觉/交互设计)'}selected{/if} value="设计（视觉/交互设计)">设计（视觉/交互设计)</option>
                                    <option {if !empty($sign_info) && $sign_info.job_type == '市场（推广/渠道/品牌)'}selected{/if} value="市场（推广/渠道/品牌)">市场（推广/渠道/品牌)</option>
                                    <option {if !empty($sign_info) && $sign_info.job_type == '职能（人力/行政/财务）'}selected{/if} value="职能（人力/行政/财务）">职能（人力/行政/财务）</option>
                                    <option {if !empty($sign_info) && $sign_info.job_type == '工程（土木/建筑/装饰）'}selected{/if} value="工程（土木/建筑/装饰）">工程（土木/建筑/装饰）</option>
                                    <option {if !empty($sign_info) && $sign_info.job_type == '运输（物流/采购/仓储）'}selected{/if} value="运输（物流/采购/仓储）">运输（物流/采购/仓储）</option>
                                    <option {if !empty($sign_info) && $sign_info.job_type == '制造（车间/技工/维修）'}selected{/if} value="制造（车间/技工/维修）">制造（车间/技工/维修）</option>
                                    <option {if !empty($sign_info) && $sign_info.job_type == '教育（老师/培训/法律）'}selected{/if} value="教育（老师/培训/法律）">教育（老师/培训/法律）</option>
                                    <option {if !empty($sign_info) && $sign_info.job_type == '产品（产品经理/运营）'}selected{/if} value="产品（产品经理/运营）">产品（产品经理/运营）</option>
                                    <option {if !empty($sign_info) && $sign_info.job_type == '其他'}selected{/if} value="其他">其他</option>
                                </select>
                            </div>
                        </li>
                        <li class="list-item form-info-item flex rcb">
                            <div class="form-title-view">
                                <span class="form-title">期望薪资</span>
                            </div>
                            <div class="form-con-view">
                                <div class="form-select-value-item flex rce">
                                    <span class="value-item">{$sign_info.expected_salary | default='5001-8000元'}</span>
                                    <img src="__INDEX__/icon/icon_arrow_right.png" alt="" class="arrow-icon" />
                                </div>
                                <select name="expected_salary" onchange="selectOnChange(this);" class="form-con-value form-select-item">
                                    <option value="">请选择</option>
                                    <option {if !empty($sign_info) && $sign_info.expected_salary == '15001元及以上'}selected{/if} value="15001元及以上">15001元及以上</option>
                                    <option {if !empty($sign_info) && $sign_info.expected_salary == '10001-15000元'}selected{/if} value="10001-15000元">10001-15000元</option>
                                    <option {if !empty($sign_info) && $sign_info.expected_salary == '8001-10000元'}selected{/if} value="8001-10000元">8001-10000元</option>
                                    <option {if (!empty($sign_info) && $sign_info.expected_salary == '5001-8000元') || $sign_info == ''}selected{/if} value="5001-8000元">5001-8000元</option>
                                    <option {if !empty($sign_info) && $sign_info.expected_salary == '5000元及以下'}selected{/if} value="5000元及以下">5000元及以下</option>
                                </select>
                            </div>
                        </li>
                        {else /}
                        <li class="list-item form-info-item flex rcb">
                            <div class="form-title-view">
                                <span class="form-title">学校/公司</span>
                            </div>
                            <div class="form-con-view">
                                <input name="school_name" type="text" class="form-con-value form-input-item" placeholder="请输入学校/公司" />
                            </div>
                        </li>
                        <li class="list-item form-info-item flex rcb">
                            <div class="form-title-view">
                                <span class="form-title">参会目的</span>
                            </div>
                            <div class="form-con-view">
                                <div class="form-select-value-item flex rce">
                                    <span class="value-item">{$sign_info.purpose | default='请选择'}</span>
                                    <img src="__INDEX__/icon/icon_arrow_right.png" alt="" class="arrow-icon" />
                                </div>
                                <select name="purpose" onchange="selectOnChange(this);" class="form-con-value form-select-item">
                                    <option value="">请选择</option>
                                    <option {if !empty($sign_info) && $sign_info.purpose == '观展学习'}selected{/if} value="观展学习">观展学习</option>
                                    <option {if !empty($sign_info) && $sign_info.purpose == '投资加盟'}selected{/if} value="投资加盟">投资加盟</option>
                                    <option {if !empty($sign_info) && $sign_info.purpose == '其他'}selected{/if} value="其他">其他</option>
                                </select>
                            </div>
                        </li>
                        {/if}
                    </ul>
                    <div class="aa"></div>
                    <div class="btn-wrap form-btn-wrap">
                        <div class="btn-item submit-btn-item flex ccc" onclick="sign_up();">
                            <span class="btn-item-a flex ccc flex-1 w100">立即报名</span>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    {include file='public/public_script' /}
</body>
<script src="__COMMON__/layuiadmin/layui/layui.js"></script>
<script src="__COMMON__/system/js/common.js"></script>
<script>

    $(function() {
        var aid_0 = "{$activity_info.id}";

        var aid_1 = window.localStorage['aid_1'];
        var aid_2 = window.localStorage['aid_2'];
        var sign_id_1 = window.localStorage['sign_id_1'];
        var sign_id_2 = window.localStorage['sign_id_2'];

        var aid = aid_0 > 1 ? aid_2 : aid_1;
        var sign_id = aid_0 > 1 ? sign_id_2 : sign_id_1;

        console.log('aid, aid_1, aid_2, sign_id---->', aid, aid_1, aid_2, sign_id);

        if (aid && sign_id) {
            window.location.href = "{:url('index/sign_result')}?aid=" + aid + "&sid=" + sign_id;
        }
    })

    function selectOnChange(obj) {
        var _this = $(obj);
        var _thisValueCon = _this.prev('.form-select-value-item').find('.value-item');

        var _value = _this.find("option:selected").text();

        _thisValueCon.text(_value);
    }

    layui.config({
        base: '__COMMON__/layuiadmin/modules/' //静态资源所在路径
    }).use('common', 'element');

    layui.use(['form', 'element','uploader'], function () {
        var fn = {
            sign_up: function () {
                send_form("form_data", "{:url('sign_up')}", function (res) {
                    if (res.code == 1) {

                        var aid = "{$activity_info.id}";

                        if (aid == 1) {
                            localStorage.setItem("aid_1", 1);
                            localStorage.setItem("sign_id_1", res.data.sign_id);
                        } else {
                            localStorage.setItem("aid_2", 2);
                            localStorage.setItem("sign_id_2", res.data.sign_id);
                        }
                        

                        layer.msg(res.msg, {time: 1000}, function () {
                            location.href = "{:url('index/sign_result')}?aid=" + aid + "&sid=" + res.data.sign_id;
                        });
                    } else {
                        layer.msg(res.msg);
                        return false;
                    }
                });
            }
        };
        win_exp(fn);

    });
</script>
</html>